<template>

  <div>
    <ul class="post-container " @click="reply($event,topicindex,commentindex,tabId)">                
      <li class="post-thumb" v-if="topicimg&&topicimg.length"><img v-lazy="topicimg[0].src" /></li>
      <!-- <div class="post-thumb" v-else><img src="http://businessqiniu.wonderlandnet.cn/replacedefault.png" /></div> -->
      <li >
          <p class="post-title">{{title}}</p>
          <p class="post-abbreviations two-line">{{abbreviations}}</p>
          <div class="post-price">
              <div class="priceicon">¥</div>
              <div class="pricenum">{{price}}</div>
          </div>
      </li>
    </ul>
    <div class="body-sep"></div>
  </div>
</template>
<script>
export default {
  props: [
    "topictype",
    "followNumber",
    "title",
    "abbreviations",
    "topicimg",
    "tabId",
    "topicItem",
    "price",
    'commentindex',
    "topicindex"
  ],
  methods: {
    reply(event, topicindex, commentindex, tabId) {
      this.$emit("replycomment", { event: event, topicindex: topicindex, commentindex: commentindex, tabId: tabId })
    }
  }
};
</script>
<style scoped>
.post-container {
  position: relative;
  padding: 0.3rem;
  overflow: auto;
  background: #fff;
}
.post-thumb {
  float: left;
}
.post-thumb img {
  margin-right: 0.2rem;
  display: block;
  width: 2.1rem;
  height: 1.63rem;
}
.post-content {
  position: absolute;
  padding-left: 0.2rem
}
.post-abbreviations {
  font-size: 0.22rem;
  color: #777777;
  margin: 0 0 0.18rem 0;
  clear: inherit;
  line-height: 0.3rem
}
.post-title {
  clear: inherit;
  font-weight: bold;
  font-size: 0.28rem;
  color: #494949;
  margin: 0 0 0.1rem 0;
  white-space:nowrap;
  overflow: hidden;
  text-overflow: ellipsis
}
.post-price {
  display: flex;
}
.priceicon {
  padding-top: 0.01rem;
  font-size: 0.22rem;
  color: #dc4b4e;
  padding-right: 0.05rem
}
.pricenum {
  font-size: 0.26rem;
  color: #dc4b4e;
}

.body-sep {
  /*width: 6.9rem;*/
  height: 1px;
  background-color: #e6e6e6;
}
</style>
